curl --request PUT \
--url https://api.example.com/api/usuarios/{username} \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": {},
"nombre": "<string>",
"apellidos": "<string>",
"direccion_envio": "<string>",
"fecha_nacimiento": "<string>",
"activo": true,
"password": "<string>",
"rol": {}
}
'{
"200": {},
"400": {},
"401": {},
"403": {},
"404": {},
"409": {},
"usuario_id": 123,
"username": "<string>",
"email": {},
"nombre": "<string>",
"apellidos": "<string>",
"rol": {},
"direccion_envio": "<string>",
"fecha_nacimiento": "<string>",
"activo": true
}Update an existing user’s information
curl --request PUT \
--url https://api.example.com/api/usuarios/{username} \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": {},
"nombre": "<string>",
"apellidos": "<string>",
"direccion_envio": "<string>",
"fecha_nacimiento": "<string>",
"activo": true,
"password": "<string>",
"rol": {}
}
'{
"200": {},
"400": {},
"401": {},
"403": {},
"404": {},
"409": {},
"usuario_id": 123,
"username": "<string>",
"email": {},
"nombre": "<string>",
"apellidos": "<string>",
"rol": {},
"direccion_envio": "<string>",
"fecha_nacimiento": "<string>",
"activo": true
}{
"value": "user@example.com"
}
ADMIN - Administrator with full accessCLIENTE - Regular customer (default)curl -X PUT https://api.iquea.com/api/usuarios/johndoe \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username": "johndoe",
"email": {
"value": "john.doe@example.com"
},
"nombre": "John",
"apellidos": "Doe Smith",
"direccion_envio": "456 New Address, Madrid, Spain",
"fecha_nacimiento": "1990-05-15",
"activo": true,
"rol": "CLIENTE"
}'
{
"username": "johndoe",
"email": {
"value": "john.doe@example.com"
},
"nombre": "John",
"apellidos": "Doe Smith",
"direccion_envio": "456 New Address, Madrid, Spain",
"fecha_nacimiento": "1990-05-15",
"activo": true,
"rol": "CLIENTE"
}
{
"usuario_id": 1,
"username": "johndoe",
"email": {
"value": "john.doe@example.com"
},
"nombre": "John",
"apellidos": "Doe Smith",
"rol": "CLIENTE",
"direccion_envio": "456 New Address, Madrid, Spain",
"fecha_nacimiento": "1990-05-15",
"activo": true
}
rol field. Regular users attempting to change their own role or another user’s role will receive a 403 Forbidden error.